var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function (req, res, next) {
  res.render('index', { title: 'Express' });
});
router.post('/login', function (req, res, next) {
  res.send({
    code: 200,
    data: { id: Date.now(), name: 'coder-why', token: Date.now().toString() },
  });
});
module.exports = router;
